package licode.unisop.client.feign;

import licode.unisop.client.utils.SopAuthConst;
import licode.unisop.client.utils.SopResult;
import licode.unisop.client.vo.SopAsset;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 登录外部调用封装
 *
 * @author licode
 */
@FeignClient(name = "${uni-sop.service:uni-plat-service}", url = "${uni-sop.host:}")
public interface SoAssetVisitFeign {
    @RequestMapping(value = "/plat-api/v1/internal/platform/asset/query/lookup-asset/by-code", method = RequestMethod.POST)
    SopResult<SopAsset> lookupAssetByCode(@RequestParam(SopAuthConst.PLATFORM_TOKEN) String platId,
                                          @RequestParam(SopAuthConst.MODAL_TOKEN) String mToken,
                                          @RequestBody Map<String, Object> req);
}
